Optimal. Leaf size=58 \[ a A x+\frac {a (2 A+C) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {a C \tan (c+d x)}{d}+\frac {a C \sec (c+d x) \tan (c+d x)}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 58, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {4134, 3855,
3852, 8} \begin {gather*} \frac {a (2 A+C) \tanh ^{-1}(\sin (c+d x))}{2 d}+a A x+\frac {a C \tan (c+d x)}{d}+\frac {a C \tan (c+d x) \sec (c+d x)}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3852
Rule 3855
Rule 4134
Rubi steps
\begin {align*} \int (a+a \sec (c+d x)) \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {a C \sec (c+d x) \tan (c+d x)}{2 d}+\frac {1}{2} \int \left (2 a A+a (2 A+C) \sec (c+d x)+2 a C \sec ^2(c+d x)\right ) \, dx\\ &=a A x+\frac {a C \sec (c+d x) \tan (c+d x)}{2 d}+(a C) \int \sec ^2(c+d x) \, dx+\frac {1}{2} (a (2 A+C)) \int \sec (c+d x) \, dx\\ &=a A x+\frac {a (2 A+C) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {a C \sec (c+d x) \tan (c+d x)}{2 d}-\frac {(a C) \text {Subst}(\int 1 \, dx,x,-\tan (c+d x))}{d}\\ &=a A x+\frac {a (2 A+C) \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {a C \tan (c+d x)}{d}+\frac {a C \sec (c+d x) \tan (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 67, normalized size = 1.16 \begin {gather*} a A x+\frac {a A \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a C \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac {a C \tan (c+d x)}{d}+\frac {a C \sec (c+d x) \tan (c+d x)}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.40, size = 74, normalized size = 1.28
method | result | size |
derivativedivides | \(\frac {A a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+a C \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+A a \left (d x +c \right )+a C \tan \left (d x +c \right )}{d}\) | \(74\) |
default | \(\frac {A a \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )+a C \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )+A a \left (d x +c \right )+a C \tan \left (d x +c \right )}{d}\) | \(74\) |
norman | \(\frac {a A x +a A x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 a A x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\frac {3 a C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}-\frac {a C \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}-\frac {a \left (2 A +C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {a \left (2 A +C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) | \(134\) |
risch | \(a A x -\frac {i a C \left ({\mathrm e}^{3 i \left (d x +c \right )}-2 \,{\mathrm e}^{2 i \left (d x +c \right )}-{\mathrm e}^{i \left (d x +c \right )}-2\right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{d}-\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{2 d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{d}+\frac {a \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{2 d}\) | \(139\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 88, normalized size = 1.52 \begin {gather*} \frac {4 \, {\left (d x + c\right )} A a - C a {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 4 \, A a \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) + 4 \, C a \tan \left (d x + c\right )}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.20, size = 101, normalized size = 1.74 \begin {gather*} \frac {4 \, A a d x \cos \left (d x + c\right )^{2} + {\left (2 \, A + C\right )} a \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (2 \, A + C\right )} a \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) + 2 \, {\left (2 \, C a \cos \left (d x + c\right ) + C a\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} a \left (\int A\, dx + \int A \sec {\left (c + d x \right )}\, dx + \int C \sec ^{2}{\left (c + d x \right )}\, dx + \int C \sec ^{3}{\left (c + d x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.47, size = 105, normalized size = 1.81 \begin {gather*} \frac {2 \, {\left (d x + c\right )} A a + {\left (2 \, A a + C a\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - {\left (2 \, A a + C a\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, {\left (C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, C a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.63, size = 128, normalized size = 2.21 \begin {gather*} \frac {2\,A\,a\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {2\,A\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {C\,a\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {C\,a\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )}+\frac {C\,a\,\sin \left (c+d\,x\right )}{2\,d\,{\cos \left (c+d\,x\right )}^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________